home *** CD-ROM | disk | FTP | other *** search
- -- background: 42187 from stack: in
- -- bmap block id: 48382
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- on extend
- answer "Do you want three more months of cards?" with "Cancel" or "OK"
- if it is "Cancel" then exit extend
- go to last card of this background
- put getStartDate() into start --what date to begin on
- if start is "Cancel" then exit extend
- put 60*60*24 into OneDay --seconds in a day
- put start into it --a copy
- convert it to long date
- global calcMonth
- put word 1 of item 2 of it into calcMonth
- set name of this bkgnd to calcMonth
- repeat with cnt = 1 to (365 div 4) --three months
- put start into it --a copy
- convert it to long date
- put item 1 of it into field "Day of Week"
- put item 2 of it into field "Date"
- put item 3 of it into field "Year"
- add OneDay to start
- doMenu New Card
- upDateBkgnd start --make a new background if new month
- end repeat
- doMenu "Delete Card"
- end extend
-
- on upDateBkgnd start
- global calcMonth
- put start into it --a copy
- convert it to long date
- if word 1 of item 2 of it <> calcMonth then --if new month
- --create a new background.
- put word 1 of item 2 of it into calcMonth
- doMenu "Cut Card" --new bkgnd is a copy with only name changed
- go previous card
- put the long name of this card into goodStack
- set lockScreen to true
- go to stack "home"
- --must go to another stack to avoid changing the original bkgnd
- doMenu "Paste Card"
- set name of this background to word 1 of item 2 of it
- doMenu "Cut Card"
- go goodStack
- set lockScreen to false
- doMenu "Paste Card"
- set name of this bkgnd to calcMonth
- end if
- end upDateBkgnd
-
- function getStartDate
- -- end of stack or today, whichever is newer
- get field "Date"
- if it is empty then put the short date into it
- convert it to seconds --so we can compare
- put the short date into today
- convert today to seconds
- if today < 2587766400 then
- answer "Set the Control Panel to today's date" with "OK"
- return "Cancel"
- end if
- if it >= today then return it --calendar already beyond today
- convert it to short date
- answer "Start from which date?" with it or the short date or "Cancel"
- if it is "Cancel" then return it
- convert it to seconds
- return it
- end getStartDate
-
- on openBackground
- push recent card
- end openBackground
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=321 top=283 right=311 bottom=350
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Do
- ----- HyperTalk script -----
- on mouseUp
- go card "First Do" of "Datebook"
- end mouseUp
-
-
-
- -- part 8 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=59 top=119 right=290 bottom=489
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 10
- -- style flags: 0
- -- line height: 16
- -- part name: c
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=26 top=281 right=315 bottom=64
- -- title width / last selected line: 0
- -- icon id / first selected line: 1011 / 1011
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go "Home"
- end mouseUp
-
-
-
- -- part 10 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=420 top=281 right=312 bottom=455
- -- title width / last selected line: 0
- -- icon id / first selected line: 30696 / 30696
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Phone
- ----- HyperTalk script -----
- on mouseUp
- get the selection
- if it is empty then get the message
- if it is empty then ask "Dial what number?"
- if it is not empty then
- push this card
- visual effect zoom open
- go to stack "Phone"
- dial it
- pop card
- end if
- end mouseUp
-
-
-
- -- part 11 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=458 top=280 right=311 bottom=491
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Address
- ----- HyperTalk script -----
- on mouseUp
- get the selection
- visual effect zoom open
- go to "Address"
- if it is not empty then find it
- end mouseUp
-
-
-
- -- part 12 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=355 top=285 right=310 bottom=383
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Datebook Answer
- ----- HyperTalk script -----
- on mouseUp
- answer "This is a Daily Calendar" with OK
- end mouseUp
-
-
-
-
- -- part 13 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=389 top=286 right=310 bottom=416
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Calendar
- ----- HyperTalk script -----
- on mouseUp
- get the seconds
- convert it to dateItems
- put ((item 1 of it) - 1987) *2 into whichSix
- if item 2 of it > 6 then add 1 to whichSix
- visual effect zoom open
- if whichSix < 1 then go card 1 of stack "Datebook"
- else if whichSix > 5 then go card 5 of stack "Datebook"
- else
- go to card whichSix of stack "Datebook"
- send "bracketWeek" && the seconds to this card
- end if
- end mouseUp
-
-
-
- -- part 15 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=229 top=309 right=334 bottom=256
- -- title width / last selected line: 0
- -- icon id / first selected line: 1014 / 1014
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Prev
- ----- HyperTalk script -----
- on mouseUp
- visual effect wipe right
- go to previous card
- end mouseUp
-
-
-
- -- part 16 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=257 top=308 right=335 bottom=285
- -- title width / last selected line: 0
- -- icon id / first selected line: 1013 / 1013
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Next
- ----- HyperTalk script -----
- on mouseUp
- visual effect wipe left
- go to next card
- end mouseUp
-
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=464 top=311 right=336 bottom=495
- -- title width / last selected line: 0
- -- icon id / first selected line: 1012 / 1012
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Return
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- pop card
- end mouseUp
-
-
-
- -- part 18 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=22 top=61 right=84 bottom=193
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 2
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Day of Week
-
-
- -- part 19 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=11 top=81 right=115 bottom=205
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 2
- -- text size: 24
- -- style flags: 0
- -- line height: 32
- -- part name: Date
-
-
- -- part 20 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=305 top=25 right=50 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 2
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Year
-
-
- -- part 21 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=26 top=314 right=329 bottom=72
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Extend
- ----- HyperTalk script -----
- on mouseUp
- extend
- end mouseUp
-
-